<img src="/code" id="code_img" onclick="changeImage()"/>
<script>
  $(document).ready(function(){

    $('<img src="/code" id="code_img" />').insertAfter("#user_captcha");
    $("#code_img").click(function() {
      $("#code_img").attr("src","/code?tmp="+new Date().getTime());
    });
  });
    function changeImage(){
        $("#code_img").attr("src","/code?tmp="+new Date().getTime())
    }
</script>
